package com.filedemo.service;

import com.filedemo.dao.FilesMapper;
import com.filedemo.entity.Files;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class FilesServiceImpl implements FilesService {

    @Autowired
    private FilesMapper filesMapper;

    public void addFile(Files files) {
        filesMapper.insert(files);
    }

    @Override
    public String queryFileByUUID(String UUID) {
        return filesMapper.queryFileByUUID(UUID);
    }

    @Override
    public Files queryFileJSON(String UUID) {
        return filesMapper.queryFileJSON(UUID);
    }

    public List<Files> queryAllFiles() {
        return filesMapper.queryAllFiles();
    }
}
